package com.zuoye.day20;

import java.io.*;
import java.util.ArrayList;


public class TxtTest {
    public static void main(String[] args) {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new InputStreamReader((new FileInputStream("d://record.txt"))));

            //创建集合对象
            ArrayList<Integer> array = new ArrayList<>();
            int data;
            while ((data = br.read()) != -1) {
                System.out.print((char) data);
                array.add(data);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }

    }

}
